package com.lbd99.data.lbd.service;


import com.lbd99.data.lbd.dao.XContentMapper;
import com.lbd99.data.lbd.vo.XContent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class XContentService {

    @Autowired
    private XContentMapper xXContentMapper;

    public List<XContent> selectList(Integer yearId) {
        XContent bean = new XContent();
        bean.setYearId(yearId);
        return xXContentMapper.selectList(bean);
    }

    public Map<String, Object> updateByPrimaryKeySelective(XContent record) {
        Map<String, Object> map = new HashMap<String, Object>();
        xXContentMapper.updateByPrimaryKeySelective(record);
        map.put("isSuc", true);
        map.put("msg", "操作成功");
        return map;
    }
}